<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
  <title>Description of createTSConnectionHeatmap_Fig5CD</title>
  <meta name="keywords" content="createTSConnectionHeatmap_Fig5CD">
  <meta name="description" content="Creates a heatmap of tumor suppressor connectivity from 11 DAS sources that provides protein interaction data">
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta name="generator" content="m2html &copy; 2003 Guillaume Flandin">
  <meta name="robots" content="index, follow">
  <link type="text/css" rel="stylesheet" href="../../m2html.css">
</head>
<body>
<a name="_top"></a>
<div><a href="../../index.html">Home</a> &gt;  <a href="../index.html">code</a> &gt; <a href="index.html">examples</a> &gt; createTSConnectionHeatmap_Fig5CD.m</div>

<!--<table width="100%"><tr><td align="left"><a href="../../index.html"><img alt="<" border="0" src="../../left.png">&nbsp;Master index</a></td>
<td align="right"><a href="index.html">Index for code\examples&nbsp;<img alt=">" border="0" src="../../right.png"></a></td></tr></table>-->

<h1>createTSConnectionHeatmap_Fig5CD
</h1>

<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="box"><strong>Creates a heatmap of tumor suppressor connectivity from 11 DAS sources that provides protein interaction data</strong></div>

<h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="box"><strong>function createTSConnectionHeatmap_Fig5CD() </strong></div>

<h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="fragment"><pre class="comment"> Creates a heatmap of tumor suppressor connectivity from 11 DAS sources that provides protein interaction data

 createTSConnectionHeatmap() builds a heatmap for tumor suppressor
 connectivity retrieving data from 11 DAS sources that provides protein
 interactions data. The heatmap exhibits how connected is each TS, and
 also allows to assess the degree of reliability for a specific TS-nonTS
 interaction.

 SYNTAX: [] = createTSConnectionHeatmap()

 NOTE: assembling these 11 TS networks can take several minutes. To load
 the pre-built dataset uncomment the following line below:
                load TSNetwork_Heatmap.mat conn nonTS tsGenes;

 See also createTumorSuppressorsNet(), tumorSuppressorNetwork_Fig5AB()

    DASMiner: DAS library and browser for Matlab.
    Diogo Veiga, Jan 2009.</pre></div>

<!-- crossreference -->
<h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
This function calls:
<ul style="list-style-image:url(../../matlabicon.gif)">
<li><a href="createTumorSuppressorsNet.html" class="code" title="function [TSnet] = createTumorSuppressorsNet(dasURL,dsn,display)">createTumorSuppressorsNet</a>	Cretes a protein interaction network involving tumor suppressors for the specified DAS molecular interaction database</li></ul>
This function is called by:
<ul style="list-style-image:url(../../matlabicon.gif)">
</ul>
<!-- crossreference -->


<h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="fragment"><pre>0001 <a name="_sub0" href="#_subfunctions" class="code">function createTSConnectionHeatmap_Fig5CD()</a>
0002 <span class="comment">% Creates a heatmap of tumor suppressor connectivity from 11 DAS sources that provides protein interaction data</span>
0003 <span class="comment">%</span>
0004 <span class="comment">% createTSConnectionHeatmap() builds a heatmap for tumor suppressor</span>
0005 <span class="comment">% connectivity retrieving data from 11 DAS sources that provides protein</span>
0006 <span class="comment">% interactions data. The heatmap exhibits how connected is each TS, and</span>
0007 <span class="comment">% also allows to assess the degree of reliability for a specific TS-nonTS</span>
0008 <span class="comment">% interaction.</span>
0009 <span class="comment">%</span>
0010 <span class="comment">% SYNTAX: [] = createTSConnectionHeatmap()</span>
0011 <span class="comment">%</span>
0012 <span class="comment">% NOTE: assembling these 11 TS networks can take several minutes. To load</span>
0013 <span class="comment">% the pre-built dataset uncomment the following line below:</span>
0014 <span class="comment">%                load TSNetwork_Heatmap.mat conn nonTS tsGenes;</span>
0015 <span class="comment">%</span>
0016 <span class="comment">% See also createTumorSuppressorsNet(), tumorSuppressorNetwork_Fig5AB()</span>
0017 <span class="comment">%</span>
0018 <span class="comment">%    DASMiner: DAS library and browser for Matlab.</span>
0019 <span class="comment">%    Diogo Veiga, Jan 2009.</span>
0020 
0021 
0022 <span class="comment">% load TSNetwork_Heatmap.mat conn nonTS tsGenes;</span>
0023 
0024 <span class="keyword">global</span> tsGenes;
0025 <span class="keyword">global</span> tsEntrezID;
0026 
0027 nets = struct(<span class="string">'graph'</span>,{},<span class="string">'label'</span>,{});
0028 nets(1).graph = <a href="createTumorSuppressorsNet.html" class="code" title="function [TSnet] = createTumorSuppressorsNet(dasURL,dsn,display)">createTumorSuppressorsNet</a>(<span class="string">'http://dasmi.bioinf.mpi-inf.mpg.de/das'</span>,<span class="string">'ddi'</span>,false);
0029 nets(1).label = <span class="string">'DDI'</span>;
0030 nets(2).graph = <a href="createTumorSuppressorsNet.html" class="code" title="function [TSnet] = createTumorSuppressorsNet(dasURL,dsn,display)">createTumorSuppressorsNet</a>(<span class="string">'http://dasmi.bioinf.mpi-inf.mpg.de/das'</span>,<span class="string">'hprdEntrez'</span>,false);
0031 nets(2).label = <span class="string">'HPRD'</span>;
0032 nets(3).graph = <a href="createTumorSuppressorsNet.html" class="code" title="function [TSnet] = createTumorSuppressorsNet(dasURL,dsn,display)">createTumorSuppressorsNet</a>(<span class="string">'http://dasmi.bioinf.mpi-inf.mpg.de/das'</span>,<span class="string">'bioverse'</span>,false);
0033 nets(3).label = <span class="string">'Bioverse'</span>;
0034 nets(4).graph = <a href="createTumorSuppressorsNet.html" class="code" title="function [TSnet] = createTumorSuppressorsNet(dasURL,dsn,display)">createTumorSuppressorsNet</a>(<span class="string">'http://dasmi.bioinf.mpi-inf.mpg.de/das'</span>,<span class="string">'bioverse-core'</span>,false);
0035 nets(4).label = <span class="string">'Bioverse-core'</span>;
0036 nets(5).graph = <a href="createTumorSuppressorsNet.html" class="code" title="function [TSnet] = createTumorSuppressorsNet(dasURL,dsn,display)">createTumorSuppressorsNet</a>(<span class="string">'http://dasmi.bioinf.mpi-inf.mpg.de/das'</span>,<span class="string">'ophid'</span>,false); 
0037 nets(5).label = <span class="string">'OPHID'</span>;
0038 nets(6).graph = <a href="createTumorSuppressorsNet.html" class="code" title="function [TSnet] = createTumorSuppressorsNet(dasURL,dsn,display)">createTumorSuppressorsNet</a>(<span class="string">'http://dasmi.bioinf.mpi-inf.mpg.de/das'</span>,<span class="string">'point'</span>,false);
0039 nets(7).label = <span class="string">'Point'</span>;
0040 nets(7).graph = <a href="createTumorSuppressorsNet.html" class="code" title="function [TSnet] = createTumorSuppressorsNet(dasURL,dsn,display)">createTumorSuppressorsNet</a>(<span class="string">'http://dasmi.bioinf.mpi-inf.mpg.de/das'</span>,<span class="string">'homomint'</span>,false); 
0041 nets(7).label = <span class="string">'HomoMINT'</span>;
0042 nets(8).graph = <a href="createTumorSuppressorsNet.html" class="code" title="function [TSnet] = createTumorSuppressorsNet(dasURL,dsn,display)">createTumorSuppressorsNet</a>(<span class="string">'http://dasmi.bioinf.mpi-inf.mpg.de/das'</span>,<span class="string">'CCSB-HI1'</span>,false);
0043 nets(8).label = <span class="string">'CCSB-HI1'</span>;
0044 nets(9).graph = <a href="createTumorSuppressorsNet.html" class="code" title="function [TSnet] = createTumorSuppressorsNet(dasURL,dsn,display)">createTumorSuppressorsNet</a>(<span class="string">'http://dasmi.bioinf.mpi-inf.mpg.de/das'</span>,<span class="string">'sanger'</span>,false);
0045 nets(9).label = <span class="string">'Sanger'</span>;
0046 nets(10).graph = <a href="createTumorSuppressorsNet.html" class="code" title="function [TSnet] = createTumorSuppressorsNet(dasURL,dsn,display)">createTumorSuppressorsNet</a>(<span class="string">'http://dasmi.bioinf.mpi-inf.mpg.de/das'</span>,<span class="string">'himap'</span>,false);
0047 nets(10).label = <span class="string">'Himap'</span>;
0048 nets(11).graph = <a href="createTumorSuppressorsNet.html" class="code" title="function [TSnet] = createTumorSuppressorsNet(dasURL,dsn,display)">createTumorSuppressorsNet</a>(<span class="string">'http://dasmi.bioinf.mpi-inf.mpg.de/das'</span>,<span class="string">'himap-core'</span>,false);
0049 nets(11).label = <span class="string">'Himap-core'</span>;
0050 
0051 
0052 <span class="comment">%Matrix holds connectivity weight</span>
0053 conn = []; <span class="comment">%initial state</span>
0054 nonTS = {}; <span class="comment">%holds labels for non-TS genes</span>
0055 
0056 
0057 <span class="keyword">for</span> i=1:size(nets,2)
0058 
0059     <span class="keyword">for</span> j=1:size(nets(i).graph.Nodes)
0060 
0061         <span class="keyword">if</span>(isempty(strmatch(nets(i).graph.Nodes(j).Label,tsGenes,<span class="string">'exact'</span>))) <span class="comment">%non TS gene</span>
0062 
0063             anc = getancestors(nets(i).graph.Nodes(j),1); <span class="comment">% TS interacting with this TS gene</span>
0064             idxNonTS = strmatch(nets(i).graph.Nodes(j).Label,nonTS,<span class="string">'exact'</span>);
0065            
0066             <span class="keyword">if</span>(isempty(idxNonTS)) <span class="comment">% new non-TS</span>
0067                 conn = [conn; zeros(1,size(tsGenes,2))]; <span class="comment">%add new row to conn matrix</span>
0068                 nonTS = [nonTS nets(i).graph.Nodes(j).Label]; <span class="comment">%add new label</span>
0069                 idxNonTS = strmatch(nets(i).graph.Nodes(j).Label,nonTS,<span class="string">'exact'</span>); <span class="comment">%get new index</span>
0070             <span class="keyword">end</span>
0071             
0072             <span class="keyword">for</span> k=1:size(anc)
0073                 idxTS = strmatch(anc(k).ID,tsEntrezID,<span class="string">'exact'</span>);
0074                 <span class="keyword">if</span> (~isempty(idxTS))
0075                     conn(idxNonTS,idxTS) = conn(idxNonTS,idxTS) + 1;
0076                 <span class="keyword">end</span>
0077             <span class="keyword">end</span>
0078 
0079         <span class="keyword">end</span>
0080     <span class="keyword">end</span>
0081 
0082 <span class="keyword">end</span>
0083 
0084 
0085 <span class="comment">%Heatmap of protein-TS interaction</span>
0086 figure;
0087 img = imagesc(conn);
0088 set(gca,<span class="string">'XTickLabel'</span>,tsGenes);
0089 <span class="comment">%set(gca,'YTickLabel',nonTS);</span>
0090 set(gca,<span class="string">'YTickLabel'</span>,{});
0091 set(gca,<span class="string">'YTick'</span>,[1:2403]);
0092 set(gca,<span class="string">'XTick'</span>,[1:22]);
0093 set(gca,<span class="string">'FontSize'</span>,8);
0094 colormap(<span class="string">'hot'</span>);
0095 colorbar
0096 
0097 <span class="comment">%Heatmap: closer look to protein-TS interactions for the first 30 non-TS genes</span>
0098 figure;
0099 img = imagesc(conn(1:30,:));
0100 set(gca,<span class="string">'XTickLabel'</span>,tsGenes);
0101 set(gca,<span class="string">'YTickLabel'</span>,nonTS(1:30));
0102 set(gca,<span class="string">'YTick'</span>,[1:30]);
0103 set(gca,<span class="string">'XTick'</span>,[1:22]);
0104 set(gca,<span class="string">'FontSize'</span>,8);
0105 colormap(<span class="string">'hot'</span>);
0106 colorbar
0107 
0108 
0109 
0110 
0111 
0112 
0113 
0114 
0115 
0116 
0117</pre></div>
<hr><address>Generated on Tue 17-Feb-2009 16:59:45 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/">m2html</a></strong> &copy; 2003</address>
</body>
</html>